<template>
  <AvicModal :visible="true" :title="`查看响应历史`" width="1440px" height="640px" :centered="true" @cancel="closeModal">
    <div class="flow-chart">
      <div class="history-box">
        <AvicBpmResponseHistory ref="AvicBpmResponseHistoryRef" current-tab="list" :flow-param="flowData" />
      </div>
    </div>
    <template #footer>
      <a-button title="返回" type="primary" ghost @click="closeModal">返回</a-button>
    </template>
  </AvicModal>
</template>
<script lang="ts" setup>
import AvicBpmResponseHistory from '@/views/avic/bpm/flowdetail/components/bpm-response-history/index.vue';
import bpmUtils from '@/views/avic/bpm/bpmutils/FlowUtils';
const props = defineProps({
  entryId: {
    type: String,
    required: true,
    default: ''
  }
});
const AvicBpmResponseHistoryRef = ref(null);
const flowData = ref({
  url: `${bpmUtils.baseurl}/business/doGettracksByPage/v2`,
  parameter: {
    entryId: props.entryId
  },
  method: 'post'
});
const $emit = defineEmits(['close']);

function closeModal() {
  $emit('close');
}
onMounted(() => {
  setTimeout(() => {
    AvicBpmResponseHistoryRef.value.refreshFlowTracking();
  }, 300);
});
</script>
<style lang="less" scoped>
.main {
  border: 1px solid #d6dce3;
}
.flow-chart {
  height: 100%;
}
.history-box {
  height: 100%;
}
.bpm-spin-box {
  height: 100%;
}
.ant-spin-nested-loading {
  height: 100%;
}
:deep(.ant-spin-container) {
  height: 100%;
  > div {
    height: 100%;
  }
}
</style>
